let myInstanceOf = (target, Origin) => {
    while(target){
        if(target.__proto__===Origin.prototype){
            return true
        }
        target = target.__proto__
    }
    return false
}

let a = [1,2]
console.log(myInstanceOf(a,Array))
console.log(myInstanceOf(a,Object))
